package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MerchantSmsNotificationMapper;
import com.ruoyi.system.domain.MerchantSmsNotification;
import com.ruoyi.system.service.IMerchantSmsNotificationService;

/**
 * 商家短信通知配置，定义短信类型、接收角色及推送状态Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class MerchantSmsNotificationServiceImpl implements IMerchantSmsNotificationService
{
    @Autowired
    private MerchantSmsNotificationMapper merchantSmsNotificationMapper;

    /**
     * 通过id查询商家短信通知配置
     *
     * @param id 商家短信通知配置，定义短信类型、接收角色及推送状态主键
     * @return 商家短信通知配置，定义短信类型、接收角色及推送状态
     */
    @Override
    public MerchantSmsNotification selectMerchantSmsNotificationById(Long id)
    {
        return merchantSmsNotificationMapper.selectMerchantSmsNotificationById(id);
    }

    /**
     * 查询商家短信通知配置列表
     *
     * @param merchantSmsNotification 商家短信通知配置，定义短信类型、接收角色及推送状态
     * @return 商家短信通知配置，定义短信类型、接收角色及推送状态
     */
    @Override
    public List<MerchantSmsNotification> selectMerchantSmsNotificationList(MerchantSmsNotification merchantSmsNotification)
    {
        return merchantSmsNotificationMapper.selectMerchantSmsNotificationList(merchantSmsNotification);
    }

    /**
     * 新增商家短信通知配置
     *
     * @param merchantSmsNotification 商家短信通知配置，定义短信类型、接收角色及推送状态
     * @return 结果
     */
    @Override
    public int insertMerchantSmsNotification(MerchantSmsNotification merchantSmsNotification)
    {
        return merchantSmsNotificationMapper.insertMerchantSmsNotification(merchantSmsNotification);
    }

    /**
     * 修改商家短信通知配置
     *
     * @param merchantSmsNotification 商家短信通知配置，定义短信类型、接收角色及推送状态
     * @return 结果
     */
    @Override
    public int updateMerchantSmsNotification(MerchantSmsNotification merchantSmsNotification)
    {
        return merchantSmsNotificationMapper.updateMerchantSmsNotification(merchantSmsNotification);
    }

    /**
     * 通过id批量删除商家短信通知配置信息
     *
     * @param ids 需要删除的商家短信通知配置，定义短信类型、接收角色及推送状态主键
     * @return 结果
     */
    @Override
    public int deleteMerchantSmsNotificationByIds(Long[] ids)
    {
        return merchantSmsNotificationMapper.deleteMerchantSmsNotificationByIds(ids);
    }

    /**
     * 通过id删除商家短信通知配置信息
     *
     * @param id 商家短信通知配置，定义短信类型、接收角色及推送状态主键
     * @return 结果
     */
    @Override
    public int deleteMerchantSmsNotificationById(Long id)
    {
        return merchantSmsNotificationMapper.deleteMerchantSmsNotificationById(id);
    }
}
